<template>
  <div class="mainbox">
    <banner></banner>
    <main-content :catname="title">

      <div class="inner_content" slot="inner_content">
        <div class="page_con">
         <div class="page_con"  v-html="data.content"></div>
        </div>
      </div>

    </main-content>

    <footer-bar></footer-bar>

    <main-menu></main-menu>
  </div>
</template>

<script>
  import Banner from '@/components/bannder/Banner';
  import MainMenu from '@/components/mainmenu/MainMenu';
  import mainContent from '@/components/content/mainContent';
  import footerBar from '@/components/content/footerBar';

  export default {
    name: "Pages",
    data() {
      return {
        type: '',
        page: 1,
        limit: 10,
        menu_list:[],
        cur_tab:'',
        data:[],
        title:''

      }
    },
    components: {
      Banner,
      MainMenu,
      mainContent,
      footerBar
    },

    created() {
       this.type = this.$route.query.type;
       console.log('type',this.type)
       this.title=this.$route.query.name;
      this.getContent();
    },

    watch: {
      //监听相同路由下参数变化的时候，从而实现异步刷新
      '$route'(to,from) {
        this.type = this.$route.query.type;
        this.getContent();
      },
    },

    methods: {
      load () {
        console.log('加载更多')
      },
      getContent() {
        let that = this;
        that.$http.get('/api/ScreenkApi/getColumnContent', {vollege_id:that.$util.vollege_id,type: "expert", page: that.page, limit: that.limit}, r => {
          console.log('专家团队',r);
          that.data = r.data.data[0]
          //that.menu_list = r.data.data;
          //that.cur_tab = r.data.data[0].id
        })
      },

      onTab(event){
        this.cur_tab = event.id;
      }
    }

  }
</script>

<style scoped>
  .inner_content {
    padding: 60px 50px 0 260px;
  }
  .page_con{
    font-size: 24px;
    line-height: 2;
  }
</style>
